package mk.gamemap.model.gameevent
{
	import game.tileMap.model.vo.MapObj;
	import mk.gamemap.model.gameevent.*;
	import mk.gamemap.model.gameevent.DoorEvt;
	import mk.gamemap.model.gameevent.GEvent;

	public class MapEvtFactory
	{
		public function MapEvtFactory()
		{
		}
		public static function creatEvent(mapSp:MapObj):GEvent{
			var gevt:GEvent;
			
			switch (mapSp.eventId){
				case "0":
					break;
				case "1":
					gevt=new DoorEvt(mapSp);
					break;
				case "2":
					gevt=new CharEvt(mapSp);
					break;
				case "3":
					gevt=new KeyEvt(mapSp);
					break;
			}
			return gevt;
		}
	}
}